ballisticngfandomcom-20200214-history
Trm Editor
The Trm Editor is a tool built into the Ballistic Unity Tools which allows you to manually and automatically define track sections which are then reconstructed in a similar way to the ingame track creator. This tool was designed to reconstruct BallisticNG's pre-TRM format tracks in the TRM format. Note: Actions in the trm editor are recorded into the Unity undo buffer and can therefore be undone! Setup Meshes Before you begin using the tool make sure your floor and wall meshes are separate meshes. This is not required for manually defining sections, but if you want to use the automatic tool then you will need to do this. Once your meshes are in Unity, add a unity mesh collider (not the ballistic mesh collider, which is used for a different purpose) to both the floor and wall meshes. Finally select the floor and set its layer to TransparentFX, this layer is a default Unity layer which everybody has and the automatic tool needs this to ignore the floor when scanning for the track walls. Editor Create a new gameobject and attach the TrmEditor script to it, you can find this script by searching for it in the add component menu you are presented when you click the Add Component button in the inspector. Edit Modes Sections The sections mode allows you to define sections. This mode works as a continuous method of defining track sections. You click on vertices until you've defined the shape of a whole section and then the editor state resets and you can start clicking on the next vertices. Manual Manual mode requires you to define the track shape yourself. When in this mode you are presented with a row of buttons which show you your progress through defining the shape, if you make a mistake you can click on the buttons to go to any stage in the process you want. Under this is what you need to do for the current step. In short, you define the shape as follows: Middle vert, floor left vert, wall left vert, floor right vert, wall right vert. If you set the wall vert to the same vert as the floor vert, the editor will interpret this as you not wanting a wall on that side. Automatic Automatic mode requires you to click on the middle vert of each section and then click a vert to the right to define the right vector. This is then used to raycast for the walls and reconstruct an accurate as possible shape of the track. Keep in mind, this does not work well for junctions and you need to use the manual mode for this. Junctions Junctions mode allows you to define junctions and exits on the track. This should be done after other routes have been created as this will affect the tracks structural flow if you don't. To create a junction you click on the section before the section that connects with the middle vert of the alternative, after this you hold Z and click on the first section in the route you want the junction entrance to connect to. For exits you do this the other way round, you click the last section in the route and then hold X and click the section that comes before the section which connects to the exits middle vert. By holding both Z and X at the same time and clicking on a section you can remove references, this can be useful if you make a mistake. When you create a junction or exit you will be presented with a window asking you which side of the track this is on, the side you select is the side the entrance or exit is on relative to the direction of the track. Nexts The nexts mode allows you to redefine a sections next reference. You use this primarily to connect the last section to the first section to loop the track. First click a section to select it. With that selected, hold Z and click on another section to set the selected sections next reference to the section you just clicked on. If you hold X and click on a section, you will remove the next reference. General Settings The don't connect next section toggle doesn't update the previous sections next reference. Use this for jumps and starting new routes. Auto centre middle vert toggle will ignore your defined middle vert and will be instead be defined as the middle of the two opposite sides of the floor.